package com.dianqiu.common.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.dianqiu.base.bean.BaseTO;

/**
 * DqCodetypeTbl entity. @author David Dai
 */
@Entity
@Table(name = "dq_codetype_tbl", catalog = "dq_dev")
public class DqCodetypeTblTO extends BaseTO implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String cdType;
	private String cdDescription;
	private Set<DqCodeTblTO> dqCodeTbls = new HashSet<DqCodeTblTO>(0);

	@Id
	@Column(name = "CD_TYPE", unique = true, nullable = false, length = 13)
	public String getCdType() {
		return this.cdType;
	}

	public void setCdType(String cdType) {
		this.cdType = cdType;
	}

	@Column(name = "CD_DESCRIPTION", length = 200)
	public String getCdDescription() {
		return this.cdDescription;
	}

	public void setCdDescription(String cdDescription) {
		this.cdDescription = cdDescription;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dqCodetypeTbl")
	public Set<DqCodeTblTO> getDqCodeTbls() {
		return this.dqCodeTbls;
	}

	public void setDqCodeTbls(Set<DqCodeTblTO> dqCodeTbls) {
		this.dqCodeTbls = dqCodeTbls;
	}

}